<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="./js/vue.global.js"></script>
    <title>生命周期</title>
</head>

<body>
    <div id="app">{{count}}</div>
    <script>
        const app = Vue.createApp({
            data() {
                return {
                    count: 1
                }
            },
            beforeCreate() {
                console.log('beforeCreate', this.count);
            }, created() {
                console.log('created', this.count);
            }, beforeMount() {
                console.log('breforeMount');
            }, mounted() {
                console.log('mounted');
            }, beforeUpdate() {
                console.log('beforeUpdate');
            }, updated() {
                console.log('updated');
            }, beforeUnmount() {
                console.log('beforeUnmount');
            }, unmounted() {
                console.log('unmounted');
            },
        });
        app.mount('#app');
    </script>
</body>

</html>